package lk.icta.common;

/**
 * @author Mahesha Kalpanie
 */
public class ErrorCodes {

    public static final int UNKNOWN_ERROR = 9999;

    // Error codes from 1000 - 2000 indicate invalid data for a request
    /**
     * Data requested for an unsupported language
     */
    public static final int INVALID_LANGUAGE = 1000;
    /**
     * Data requested for a non-existent district
     */
    public static final int INVALID_DISTRICT = 1001;

    // Error codes 2001 - 3000 indicate permission denied errors
    /**
     * User does not have permission to perform the action
     */
    public static final int PERMISSION_DENIED = 2001;
    /**
     * The action cannot be performed on the objects' current state
     */
    public static final int ILLEGAL_STATE = 2002;

    //Error code 3001-4000 indicate authorization errors
    public static final int AUTHORIZATION_FAILS_USER_MANAGEMENT = 3001;
    public static final int INVALID_LOGIN = 3002;
    public static final int UNAUTHORIZED_ACCESS = 3003;

    //Error code 4001-5000 indicate persistence exceptions
    public static int ENTITY_ALREADY_EXIST = 4001;
    public static int ENTITY_MANAGER_CLOSED = 4002;
    public static int NOT_AN_ENTITY = 4003;
    public static int PERSISTING_EXCEPTION_COMMON = 4004;

    //Land Register Management Error Codes
    public static final int ARCHIVED_LAND_UPDATING = 5001;
    public static final int ARCHIVED_LAND_APPROVAL = 5002;
    public static final int APPROVED_LAND_APPROVAL = 5003;
    public static final int REJECTED_LAND_APPROVAL = 5004;
    public static final int INCOMPLETE_LAND_APPROVAL = 5005;
    public static final int ARCHIVED_ALIENATION_UPDATING = 5006;
    public static final int ARCHIVED_ALIENATION_APPROVAL = 5007;
    public static final int APPROVED_ALIENATION_APPROVAL = 5008;
    public static final int REJECTED_ALIENATION_APPROVAL = 5009;
    public static final int INCOMPLETE_ALIENATION_APPROVAL = 5010;
    public static final int DUPLICATE_ENTRY = 5011;

    public static final int ARCHIVED_LAND_REJECTION = 5012;
    public static final int APPROVED_LAND_REJECTION = 5013;
    public static final int REJECTED_LAND_REJECTION = 5014;
    public static final int INCOMPLETE_LAND_REJECTION = 5015;
    public static final int ARCHIVED_ALIENATION_REJECTION = 5016;
    public static final int APPROVED_ALIENATION_REJECTION = 5017;
    public static final int REJECTED_ALIENATION_REJECTION = 5018;
    public static final int INCOMPLETE_ALIENATION_REJECTION = 5019;

    public static final int SENDING_ARCHIVED_LAND = 5021;
    public static final int SENDING_APPROVED_LAND = 5022;
    public static final int SENDING_REJECTED_LAND = 5023;
    public static final int SENDING_ARCHIVED_ALIENATION = 5024;
    public static final int SENDING_APPROVED_ALIENATION = 5025;
    public static final int SENDING_REJECTED_ALIENATION = 5026;

    public static final int EMPTY_OCCUPIER_LIST = 6001;
    public static final int INVALID_OCCUPIER = 6002;
    public static final int EMPTY_CHILDREN_LIST = 6003;
    public static final int INVALID_CHILD = 6004;


    public static final int EXCEPTION_OCCURRED = 7000;
    public static final int INVALID_WORKFLOW = 8000;
    public static final int INVALID_DATA = 9000;
}
